package com.freemypay.java.十二通过异常处理错误.八finally清理.三异常丢失;

public class LostMessage {
	void f() throws VeryImportantException {
		throw new VeryImportantException();
	}
	
	void dispose() throws HoHumException {
		throw new HoHumException();
	}
	
	public static void main(String[] args) {
		try {
			LostMessage lm = new LostMessage();
			try {
				lm.f();
			} finally {
				// TODO: handle finally clause
				lm.dispose();
			}
		} catch (Exception e) {
			// TODO Auto-generated catch block
			System.out.println(e);
		}
	}
}


class VeryImportantException extends Exception {
	@Override
	public String toString() {
		// TODO Auto-generated method stub
		return "A very important exception";
	}
}

class HoHumException extends Exception {
	@Override
	public String toString() {
		// TODO Auto-generated method stub
		return "A trivial exception";
	}
}
